<template>
  <transition name="head" appear>
    <div class="head">
      <div class="rec">
        <div class="left"></div>
        <h1>STM32智能车</h1>
        <div class="right"></div>
      </div>
    </div>
  </transition>
</template>

<script>
export default {};
</script>

<style lang="less" scoped>
.head {
  background: linear-gradient(60deg, #838e99, #e0d8d3);
  width: 100%;
  height: 60px;
  box-shadow: gray 5px 5px 5px;
  border-radius: 20px;
  line-height: 60px;
}
.rec {
  display: flex;
  justify-content: space-around;
}
.right,
.left {
  width: 10px;
  height: 70px;
  background: gray;
  transform: translateY(-70px);
}
h1 {
  margin: 0;
  padding: 0;
  text-align: center;
}
.head-enter {
  transform: translateY(-300%);
}
.head-enter-to {
  transform: translateY(0);
}
.head-leave-to {
  transform: translateY(-300%);
}
.head-enter-active,
.head-leave-active {
  transition: all 1.2s ease;
}
</style>